<template>
	<view class="content">
		<view class="card">
			<view class="info" v-for="(item,index) in msgList" :key='index'>
				<view class="spot"></view>
				<view class="right">
					<view class="msg">{{item.msg}}</view>
					<view class="time">今天{{item.time}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import request from '../../../requst.js'
	export default {
		data() {
			return {
				msgList: [{
						msg: "您已成功抢到一个订单而我却而我却二无群二群无翁群无群无群无群无ewqeqeqwwqewqwqe",
						time: "12:00",
					},
					{
						msg: "您已成功抢到一个订单！",
						time: "12:00",
					},
					{
						msg: "您已成功抢到一个订单！",
						time: "12:00",
					},
				]
			}
		},
		onLoad() {
			this.getMsg();
		},
		methods: {
			//获取信息
			getMsg(){
				request({
					url:'qijian/personalCentre/information',
					success:res=>{
						console.log(res)
						this.msgList = res.data.userMessageCenterEntities;
					}
				})
			}
		}
	}
</script>

<style>
	page {
		background: #F5F5F5;
	}
</style>

<style scoped>
	.card {
		/* width: 100vw; */
		display: flex;
		flex-direction: column;
		background: #FFFFFF;
	}

	.time {
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 24rpx;
		font-family: PingFang-SC-Medium, PingFang-SC;
		font-weight: 500;
		color: #999999;
		width: 120rpx;
	}

	.msg {
		font-size: 28rpx;
		font-family: PingFang-SC-Medium, PingFang-SC;
		font-weight: 500;
		color: #333333;
		word-break: break-all;
		padding: 20rpx 0;
		max-width: 70vw;
		text-overflow:ellipsis;
		white-space:nowrap;
		overflow:hidden; 
	}

	.info {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 20rpx 30rpx;
	}

	.right {
		width: 90vw;
		display: flex;
		justify-content: space-between;
		border-bottom: 1px solid #EBEBEB;
	}

	.left {
		display: flex;
		justify-content: flex-start;
		align-items: center;
	}
	.spot{
		width: 4px;
		height: 4px;
		background: #DC3434;
		border-radius: 50%;
		margin-right: 10rpx;
	}
	.content {
		display: flex;
		flex: 1;
		flex-direction: column;
		width: 100vw;
	}
</style>
